<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!-- 病案高级查询页面 -->
<div class="easyui-tabs" id="advanced_center_tabs" style="width:auto;height:100%;">  
		      
    <div title="查询条件" >  
	     <div id="home-layout"  class="easyui-layout" style="width:100%;height:100%;">   
		    <div data-options="region:'north'" class="north-min">
		         <div class="paddingTBL">
				    	<span>查询条件模板&nbsp;</span> 
				    	<input id="medical_advanced_inquiry_template_combobox" style="height:24px;width:150px;">
				    	<span class="paddingbtn"></span>	 
				    	<a class="easyui-linkbutton" onclick="addTemplate()">新增</a>
				    	<span class="paddingbtn"></span>	
				       	<a class="easyui-linkbutton" onclick="updateTemplate()">修改</a> 
				       	<span class="paddingbtn"></span>	
				       	<a class="easyui-linkbutton" onclick="deleteTemplate()">删除</a>
			      </div> 	
		    </div>   
		    
		    <div data-options="region:'south',collapsible:false" style="height:50px;text-align:center;">
		        <div class="paddingTBL">
			        <a class="easyui-linkbutton" onclick="medicalAdvancedInquiryBatchBrowseApply()">批量浏览申请</a>
			    	<span class="paddingL30"></span>
			       	<a class="easyui-linkbutton" onclick="medicalAdvancedInquiryBatchBrowseApplyQuery()">查询</a>
			    </div> 	
		       	<!-- 批量申请dialog -->
				<div id="medical_advanced_inquiry_batch_apply_dialog" class="easyui-dialog" data-options="closed:true" style="width:580px;height:400px;">
						<form id="medical_advanced_inquiry_batch_apply_form" method="post">
						  <div class="paddingTBL">
								<p class="paddingB">
								    <label>申请条件&nbsp;</label>
									<span id="medical_advanced_inquiry_batch_apply_condition_text"></span>
								</p>
								<p class="paddingB">
									<label>申请目的&nbsp;</label>
									<input id="medical_advanced_inquiry_bacth_apply_purpose"/>
									
									<span class="paddingL30"></span>
									
									<label>浏览天数&nbsp;</label>
									<input id="medical_advanced_inquiry_batch_browse_days" class="easyui-textbox" data-options="width:100,height:24"/>
								</p>
								<p class="paddingB">
									<label>申请描述&nbsp;</label>
									<span style="vertical-align: middle;">
									  <textarea class="" id="medical_advanced_inquiry_batch_apply_remark" style="resize:none;width:360px;height:50px;"></textarea>
									</span>
								</p>
						  </div>
					    </form>
					</div>
		    </div>   
		    
		    <div data-options="region:'west',title:'条件组设置',split:true,collapsible:false,width:'30%'" style="padding:1px;"> 
		    	<div id="medical_advanced_inquiry_condition_group_treegrid_toolbar">
		    	   <span class="paddingTBL" style="border:0px solid red"> 
				    	<a class="easyui-linkbutton" onclick="addConditionGroup()">新增</a>
				    	<span class="paddingbtn"></span>
				       	<a class="easyui-linkbutton" onclick="updateConditionGroup()">修改</a> 
  				   </span>
			       <span class="paddingLB" style="width:140px;border:0px solid red">
			        	<a class="easyui-linkbutton" onclick="deleteConditionGroup()">删除</a>
			        	<span class="paddingbtn"></span>
			        	<a class="easyui-linkbutton" onclick="unselectConditionGroup()">清选</a>
			       </span>
			    </div> 
		        <table id="medical_advanced_inquiry_condition_group_treegrid"></table>
		    </div>   
		   
		    <div data-options="region:'center',title:'可选条件',split:true,collapsible:false,width:'20%'">
		       	    <div class="paddingTL">
						<input id="medical_advanced_inquiry_condition_tree_searchbox" class="easyui-searchbox" data-options="prompt:'输入名称查询',searcher:medicalAdvancedInquiryConditionTreeFilter" style="width:90%;max-width:180px;min-width:100px;height:24px;">
					</div> 
					<div>
						<ul id="medical_advanced_inquiry_condition_tree" class="easyui-tree"></ul>
				    </div>
		    </div>
		    
		    <div data-options="region:'east',split:true,collapsible:false,width:'50%'" style="border-top:0">
		         <div  class="easyui-layout" data-options="fit:true">
					   
					    <div data-options="region:'south',title:'条件列表',collapsible:false,height:'70%'" style="border:0">
		 					  <div style="overflow-y:hidden;height:99%;">
	 						    <table id="condition_datagrid" style="height:100%;"></table>
 					          </div>
 					    </div>
					    
					    <!-- 条件明细设置Star -->
					    <div data-options="region:'north',title:'条件明细设置',collapsible:false,height:'30%'" style="border-left:0;">
			           		  <div id="templatediv8" >
			      				 <table id=tempTablediv8>
			      					<!-- <tr><td>类型，1：，f:附属诊断，2：其他诊断，y:院内感染，b:并发症，s:损伤中毒 </td></tr> -->
			      					<tr><td>
			      						<span id="condition_name_8"></span>
			      						&nbsp;
			      						<select id="temp_type8_zdlx" class="easyui-combobox" name="flx" style="width:82px;">
				      						<option value="0">全部诊断</option>
				      						<option value="1">主要诊断</option>
				      						<option value="f">附属诊断</option>
				      						<option value="2">其他诊断</option>
				      						<option value="y">院内感染</option>
				      						<option value="b">并发症</option>
				      						<option value="s">损伤中毒</option>
			      						</select>
				      					<input type="text" style="width:82px" class="easyui-textbox"  name="inputdiv8_1b" /> 
				      					从<input type="text" style="width:82px"  name="inputdiv8_2b"/>
				      					至<input type="text" style="width:82px"  name="inputdiv8_3b"/>
				      					除<input type="text" style="width:82px"  name="inputdiv8_4b"/>
				      					&nbsp;
				      					<input type="checkbox"  id="checkValueb8"/>查空值</label>
				      					&nbsp;
				      					<!-- <a href="#" class="easyui-linkbutton"  onclick="addTempdiv8()">添加</a> -->
				      					<a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
			      					</td></tr>
			      				 </table>
			           		  </div>
			            			
				       		  <div id="templatediv9" >
				       				<table id="tempTablediv9">
				       					<tr><td>
				       						<span id="condition_name_9"></span>
				       						&nbsp;
					       					 从<input type="text" style="width:80px" name='inputdiv9_1b'/>
					       					 至<input type="text" style="width:80px" name='inputdiv9_2b'/>
					       					 除<input type="text" style="width:80px" name='inputdiv9_3b'/>
					       					 &nbsp;
					      					<input type="checkbox"  id="checkValueb9"/>查空值</label>
					      					&nbsp;
				       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
				       					</td></tr>
				       				</table>
				       		   </div>
			            			
				       		   <div id="templatediv1" >
				       				<table id="tempTablediv1">
				       				<tr><td>
				       					<span id="condition_name_1"></span>
				       						&nbsp;
					       					<input type="text" id="condition_input_type_1" name="inputdiv1b" class="easyui-textbox" style="width:180px"/>(模糊查询加*)
					       					&nbsp;
					      					<input type="checkbox"  id="checkValueb1"/>查空值</label>
					      					&nbsp;
				       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
				       				</td></tr>
				       				</table>
				       		   </div>
			       			
				       		   <div id="templatediv2" >
					       			<table id="tempTablediv2">
					       				<tr><td>
					       					<span id="condition_name_2"></span>
				       						&nbsp;
						       				从<input type="text" name='inputdiv2_1b' style="width:80px" class="easyui-textbox"/>
						       				至<input type="text" name='inputdiv2_2b'  style="width:80px" class="easyui-textbox"/>
						       				 &nbsp;
					      					<input type="checkbox"  id="checkValueb2"/>查空值</label>
					      					&nbsp;
				       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
					       				</td></tr>
					       			</table>
				       			</div>
			       			
				       			<div id="templatediv3" >
				       			  <table id="tempTablediv3">
					       				<tr><td>
					       					<span id="condition_name_3"></span>
				       						&nbsp;
						       				从<input type="text" id="condition_input_type1_1b" class="easyui-textbox"  style="width:80px" name='inputdiv3_1b'/>
						       				至<input type="text" id="condition_input_type1_2b" class="easyui-textbox" style="width:80px" name='inputdiv3_2b'/>
					       					&nbsp;
					      					<input type="checkbox"  id="checkValueb3"/>查空值</label>
					      					&nbsp;
				       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
					       				</td></tr>
				       			  </table>
				       			</div>
			       			
				       			<div id="templatediv4" >
					       			<table id="tempTablediv4">
					       				<tr><td>
					       					<span id="condition_name_4"></span>
				       						&nbsp;
						       				从<input  type="text" class="easyui-datebox" data-options="formatter:myformatter,parser:myparser" style="width:150px" name='inputdiv4_1b'/>
						       				至<input type="text" class="easyui-datebox" data-options="formatter:myformatter,parser:myparser" style="width:150px" name='inputdiv4_2b'/> 
						       				&nbsp;
					      					<input type="checkbox"  id="checkValueb4"/>查空值</label>
					      					&nbsp;
				       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
						       			</td></tr>
					       			</table>
				       			</div>
			       			
				       			<div id="templatediv5" >
				       			   <table id="tempTablediv5">
				       				<tr><td>
				       					<span id="condition_name_5"></span>
				       					&nbsp;
					       				请选择：<input id="condition_input_type5" name='inputdiv5b'  style="width:180px"/>
					       				&nbsp;
				      					<input type="checkbox"  id="checkValueb5"/>查空值</label>
				      					&nbsp;
			       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
				       				</td></tr>
				       			   </table>
				       			</div>
				       			
				       			<div id="templatediv6" >
				       				<span id="condition_name_6"></span>
				       				&nbsp;
				       				请选择：<input name="inputdiv6b"  type="radio"  value="1" /><span>是</span>&nbsp;<input name="inputdiv6b" type="radio" value="0" /><span>否</span>   
			       					&nbsp;
			      					<input type="checkbox"  id="checkValueb6"/>查空值</label>
			      					&nbsp;
		       					   <a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
				       			</div>
				       			
				       			<div id="templatediv7">
				       				<table id="tempTablediv7">
				       					<tr>
				       						<td><span id='condition_name_7'></span>
				       						&nbsp;
				       						请选择：
				       						<span id="temp_span_7"></span>
				       						&nbsp;<input type="checkbox"  id="checkValueb7"/>查空值
				       						&nbsp;<a href="#" class="easyui-linkbutton"  onclick="saveCondition()">保存</a>
				       						</td>
				       					</tr>
				       				</table>
				       			</div>
					    </div>
					    <!-- 条件明细设置Star -->  
    			 </div> 
		    </div>
		       
		</div>   
    </div>  
	    
    <div title="数据列表">  
	   <div id="medical_advanced_inquiry_datagrid_toolbar" class="paddingTBL"> 
	      &nbsp;
		  <input type="checkbox" id="medical_advanced_inquiry_datagrid_filter" onclick="WhetherFilter()"/>是否过滤</label>
		  &nbsp;
    	  <a class="easyui-linkbutton" onclick="addInImgTemple()">过滤设置</a>
    	  <span class="paddingL"></span>
    	  <span>显示模板&nbsp;</span>
    	  <input id="medical_advanced_inquiry_show_field_template"/>
   	   </div> 
 	   <table id="medical_advanced_inquiry_datagrid"></table>
 	    
        <!-- 单个申请dialog -->
		<div id="medical_advanced_inquiry_single_apply_dialog" class="easyui-dialog" data-options="closed:true" style="width:490px;height:330px;">
			<form id="medical_advanced_inquiry_single_apply_form" method="post">
			   <div class="paddingTBL">
					<p class="paddingB">
					    <span style="width:180px;width:35px;">
						    <label>病案号:&nbsp;</label>
							<span id="medical_advanced_inquiry_single_apply_fprn"></span>
						</span>  
						
						<span style="width:120px;">
							<label>姓名:&nbsp;</label>
							<span id="medical_advanced_inquiry_single_apply_fname"></span>
						</span> 
						
						<span style="width:150px;">
							<label>出院日期:&nbsp;</label>
							<span id="medical_advanced_inquiry_single_apply_fcydate"></span>
						</span>
					</p>
					<p class="paddingB">
						<label>申请目的&nbsp;</label>
						<input id="medical_advanced_inquiry_single_apply_purpose" name="sApplyPurpose"/>
						
						<span class="paddingL30"></span>
						
						<label>浏览天数&nbsp;</label>
						<input id="medical_advanced_inquiry_single_browse_days" name="sBrowseDays" class="easyui-textbox" data-options="width:100,height:24" />
					</p>
					<p class="paddingB">
						<label>申请描述&nbsp;</label>
						<span style="vertical-align:middle;">
							<textarea id="medical_advanced_inquiry_single_apply_remark" name="sApplyRemark" style="resize:none;width:360px;height:50px;"></textarea>
						</span>
					</p>
			   </div>
		   </form>
	  </div>  
   
	     <!-- 查询结果filter -->
		 <!--  <div title="查询结果过滤" id="medical_advanced_inquiry_datagrid_title_filter" class="easyui-dialog" data-options="closed:true" style="width:480px;height:300px;">
				<div id="medical_advanced_inquiry_datagrid_toolbar_filter" class="paddingTBL">
				  <label class="labelWid4">结果列</label>
						<input type="text" class="easyui-textbox" id="result-queryfilter-resultcolumn" data-options="width:140,height:24"/>	  
				</div>
				
				<table id="medical_advanced_inquiry_datagrid_filter"></table> 
			    <div class="paddingTBL">
					 <a class="easyui-linkbutton" onclick="queryResult-filter-confirm()" style='width:140;height:24'>确认</a>
					 <span class="paddingL30"></span>
					 <a class="easyui-linkbutton" onclick="queryResult-filter-close()" >关闭</a>
				</div>	
				        
		 </div>	  -->
		 
		<!-- 过滤设置 -->
		<div id="medical_advanced_inquiry_datagrid_title_filter" class="easyui-dialog" data-options="closed:true" style="width:500px;height:460px;">
		<div id="medical_advanced_inquiry_datagrid_toolbar_filter"  class="easyui-layout" data-options="fit:true,border:0">
			<div data-options="region:'north'" style="height:50px;border-left:0;border-top:0">
			   <span class="paddingTBL">
				&nbsp;结果列&nbsp;<input type="text" onkeyup="loadFilterSettingFiledTableFilter()" id="medical_advanced_inquery_filter_txt" class="shootFontBold">
			   </span>
			</div>
			
			<div data-options="region:'west',split:true,collapsible:false,width:'50%'" style="border-left:0;border-botton:0"> 
				<table id="medical_advanced_inquiry_datagrid_filter_field_datagrid""></table>
			</div>
			
			<div data-options="region:'center',split:true,collapsible:false,width:'50%'" style="border-botton:0">
				<table id="medical_advanced_inquiry_datagrid_filter_field_value_datagrid"></table>
			</div>
		</div>
	</div> 
    
</div>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/MedicalCheckManage/MedicalAdvancedInquiry.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/MedicalCheckManage/ApplicaMedicTemplate.js"></script>

